import request from "@/utils/request";
import type { CategoryList } from "./model/categoryModel";
enum Api {
  category1ListUrl = "/admin/product/getCategory1",
  category2ListUrl = "/admin/product/getCategory2",
  category3ListUrl = "/admin/product/getCategory3",
}
export const getCategory1ListApi = () => {
  return request.get<any, CategoryList>(Api.category1ListUrl);
};
export const getCategory2ListApi = (category1Id: number) => {
  return request.get<any, CategoryList>(
    Api.category2ListUrl + `/${category1Id}`
  );
};
export const getCategory3ListApi = (category2Id: number) => {
  return request.get<any, CategoryList>(
    Api.category3ListUrl + `/${category2Id}`
  );
};
